--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
android/README.md fee9e3356259c967b89373cf94deec01e6a5e6b3 (fee9e335) Text, 3.16 KB
Tc9d1d9# MeshChatX Android (Chaquopy)
Native APK with embedded Python (Ta5d6ff`meshchatx/`) and a WebView UI.
Tc9d1d9## Prerequisites
Tff7b72- Android SDK (Ta5d6ff`ANDROID_HOME` / Ta5d6ff`ANDROID_SDK_ROOT`) with Ta5d6ff`cmdline-tools` and a matching **NDK** (see Ta5d6ff`android/app/build.gradle` for the pinned NDK version used in CI).
Tff7b72- **JDK 17** (Temurin or compatible).
Tff7b72- Chaquopy vendor wheels under Ta5d6ff`android/vendor/` (build locally with Ta5d6ff`bash scripts/build-android-wheels-local.sh` from repo root, or use CI artifacts).
Tc9d1d9## Lint and static analysis
Tff7b72- **Android Lint** (Java, Kotlin, manifests, resources): from Ta5d6ff`android/`, run Ta5d6ff`./gradlew --no-daemon :app:lintDebug`. HTML report: Ta5d6ff`app/build/reports/lint-results-debug.html`. CI runs this in the Android workflow when tests run.
Tff7b72- **SAST (GitHub CodeQL)**: the repository workflow includes a Ta5d6ff`java-kotlin` matrix entry (see Ta5d6ff`.github/workflows/codeql.yml`) for GitHub’s security analysis on default branches and PRs.
Tc9d1d9## Launcher shortcuts, language
Tff7b72- **App shortcuts** (long-press the launcher icon): open **Messages** (Ta5d6ff`meshchatx://app/messages`) and **Call** (Ta5d6ff`meshchatx://app/call`). The WebView handles these in Ta5d6ff`App.vue` via Ta5d6ff`handleProtocolLink`.
Tff7b72- **Per-app language (Android 13+)**: Ta5d6ff`android:localeConfig` points to Ta5d6ff`res/xml/locales_config.xml`. Add translated Ta5d6ff`values-xx/strings.xml` for Android notification/shortcut strings; the in-app language still comes from MeshChatX server config.
Tc9d1d9## Build
From repo root:
Ta5d6ff```Ta5d6ffbash
bash scripts/build-android-wheels-local.sh
Tffa657cd android
./gradlew --no-daemon :app:assembleDebug :app:assembleRelease
Ta5d6ff```
There is a **single** application variant (no product flavors). Gradle syncs the **entire** Ta5d6ff`meshchatx/` tree into Ta5d6ff`app/src/main/python/meshchatx/` (including Ta5d6ff`public/repository-server-bundled` for the in-app repository server). The Ta5d6ff`fetchRepositoryBundledWheels` task runs before sync when bundled wheels are missing; if repo root Ta5d6ff`dist/reticulum_meshchatx-*.whl` exists (e.g. from Ta5d6ff`python -m build --wheel -o dist .`), that wheel is preferred over PyPI for the bundled set.
Tc9d1d9### Native ABIs (universal APK)
Release and debug artifacts are **universal APKs** only: one APK per build type, embedding the native libraries for each ABI selected at build time.
Tff7b72- **`-PmeshchatxAbis=...`** or **`MESHCHATX_ABIS`**: comma-separated list from Ta5d6ff`arm64-v8a`, Ta5d6ff`x86_64`, Ta5d6ff`armeabi-v7a` (default: all three). This controls which Ta5d6ff`.so` variants are merged into the single universal APK, not separate per-ABI store listings.
Tc9d1d9### Outputs
Each build produces:
Tff7b72- Debug: Ta5d6ff`app/build/outputs/apk/debug/app-debug.apk`
Tff7b72- Release (unsigned until you sign): Ta5d6ff`app/build/outputs/apk/release/app-release-unsigned.apk`
Tc9d1d9### Signing release APKs
See repo root Ta5d6ff`scripts/sign-android-apks.sh` (default glob targets Ta5d6ff`outputs/apk/release/`).
Tc9d1d9## Troubleshooting
Tff7b721. Confirm Ta5d6ff`android/vendor/` contains required Ta5d6ff`.whl` files from the wheel build script.
Tff7b722. Run Ta5d6ff`./gradlew :app:assembleDebug` with Ta5d6ff`--stacktrace` if Python sync or Chaquopy pip steps fail.
Tff7b723. Re-run Ta5d6ff`./gradlew :app:assembleDebug` after changing Ta5d6ff`meshchatx/` assets; sync runs on merge Python sources tasks.
See [Ta5d6ff`../LICENSE`](../LICENSE) for full text and notices.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────